﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "ICertificate" here, you must also update the reference to "ICertificate" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IAdvancePayment
    {
        [OperationContract]
        DataSet AdvancePayment_GetAll();


        [OperationContract]
        AdvancePaymentInfo AdvancePayment_GetInfo(int AdvanceID);

        [OperationContract]
        bool AdvancePayment_CheckExistEmployee(int EmployeeID, int month, int year);

        [OperationContract]
        AdvancePaymentInfo AdvancePayment_GetInfoEmployee(int EmployeeID);

        [OperationContract]
        DataSet AdvancePayment_GetList(out int ItemCount, int currentPage, int pageSize, int BranchID, int DepartmentID, string keyword, int _month, int _year);

        [OperationContract]
        DataSet AdvancePayment_GetWithEmployee(int EmployeeID, int month, int year);

        [OperationContract]
        int AdvancePayment_Insert(AdvancePaymentInfo eInfo);

        [OperationContract]
        bool AdvancePayment_Update(AdvancePaymentInfo eInfo);

        [OperationContract]
        bool AdvancePayment_Delete(int FMID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class AdvancePaymentInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        string _Position;
        [DataMember]
        public string Position
        {
            get { return _Position; }
            set { _Position = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        decimal _Amount;
        [DataMember]
        public decimal Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }

        decimal _AmountPayment;
        [DataMember]
        public decimal AmountPayment
        {
            get { return _AmountPayment; }
            set { _AmountPayment = value; }
        }

        bool _DinhKy;
        [DataMember]
        public bool DinhKy
        {
            get { return _DinhKy; }
            set { _DinhKy = value; }
        }

        decimal _Month;
        [DataMember]
        public decimal Month
        {
            get { return _Month; }
            set { _Month = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }
}

